# FROM swr.cn-southwest-2.myhuaweicloud.com/ezpro-base/nikolaik/python-nodejs:python3.9-nodejs16 as build
# WORKDIR app
# COPY . .
# RUN perl -pi -e "s/wwLogin-1.0.0/wwLogin-1.0.0/g" ./src/components/WxQRCode.vue && \
#     sed -n '6p' ./src/components/WxQRCode.vue && \
#     echo "System is : `uname`" && \
#     node -v && \
#     npm -v && \
#     npm config set registry https://devrepo.devcloud.cn-southwest-2.huaweicloud.com/artgalaxy/api/npm/cn-southwest-2_b82eec145d0d47f0a8b7a6badbe3eff9_npm_5_0/ && \
#     npm i --cache .npm && \
#     npm run build && \
#     ls -alh ./dist  && \
#     export DOCKER_TAG=${DOCKER_PROD_TAG:-prod} && \
#     TODAY=`date "+%Y%m%d"` && \
#     echo "Pipeline Id  ${CI_PIPELINE_ID}, Build Id  ${CI_JOB_ID}, ref name  ${CI_COMMIT_REF_NAME}" && \
#     echo "tag = ${DOCKER_TAG}, ver = ${VER_PROD}-${TODAY}"  && \
#     cd dist && \
#     mkdir admin && \
#     mv `ls | grep -v "admin\|crossdomain.xml\|index.html\|liveplayer.swf"` admin && \
#     ls -alh 

FROM swr.cn-southwest-2.myhuaweicloud.com/ezpro-base/nginx:1.21-alpine as package
# 服务版本号，新版本记得更新
ARG ver=v3.0.0
ARG ezVersion
ENV VERSION=${ver}-${ezVersion}
COPY dist /usr/share/nginx/html/device
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
